{% extends "RihabBundle::layout.html.twig" %}
{% block titre %}Stage{% endblock %}
{% block body %}
<div class="main">
    <div class="row">
        <div id="list-stage" class="col-md-12">
            {% include 'StageBundle:Stage:page_list.html.twig' %}
        </div>
    </div>
</div>
{% endblock %}
{% block js %}
{{parent()}}
<script>

    resetForm()

    function deleteStage(id) {
        if (confirm('Voulez-vous supprimer')) {
            $.ajax({
                url: '{{path('stage_stage_delete')}}',
                data: 'id=' + id,
                success: function(data) {
                    $('#list-stage').html(data)
                }
            })
        }
    }
    function resetForm() {
        $('#form-type-stage input').val('')
    }
</script>
{% endblock %}